#include <REGX52.H>
void Delay(int xms)		//@12.000MHz
{
	while(xms--)
	{
		unsigned char i, j;
		i = 2;
		j = 239;
		do
		{
			while (--j);
		} while (--i);
	}
}

void main()
{
	P2_0 = 1;//初始化Led引脚，也可以不初始化
	while(1){
		//P2_0 = 1;
		if(P3_1 == 0){
			Delay(20);
			while(P3_1 == 0);
			Delay(20);
			P2_0 = ~P2_0;
		}
	}
}
